"""
徐小燕
"""
class Aninmal:
    def __init__(self, species, sound):
        if species in ['猫', '狗', '羊', '猴子', '老虎', '大象',]:
            self.species = species
            self.sound = sound
        else:
            self.species = None
            self.sound = None
        def speak(self):
            if self.species ==None:
                print ('动物园里没有动物，游戏结束！')
                return False
            else:
                print(self.species, self.sound)
                return True
        Print('动物园里有什么？')
        flag = True
        with flag:
            s = input('请输入动物种类和叫声（使用空格隔开）：')
            listl = s.split('')
            animal = Aninmal(listl[0], listl[1])
            flag = animal.speak()

